<form class="form-horizontal" id="CustomerDetailForm" xmlns:th="http://www.w3.org/1999/xhtml">
    <!--    <input class="hidden" name="userId" th:value="${user.userId}">-->
    <input class="hidden" name="custId" th:value="${customer.custId}">

    <div class="box-body">
        <div class="form-group">
            <label  class="col-sm-3 control-label">用户名 :</label>
            <div class="col-sm-8">
                <input  name="custName" class="form-control"  placeholder="" th:value="${customer.custName}">
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-3 control-label">客户地区 :</label>
            <div class="col-sm-8">
                <input name="custRegion" class="form-control" placeholder="" th:value="${customer.custRegion}">
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-3 control-label">客户经理姓名 :</label>

            <div class="col-sm-8">
                <input name="custManangerName" class="form-control" placeholder="" th:value="${customer.custManangerName}">
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-3 control-label">性别 :</label>
            <div class="col-sm-8">
                <select name="custLevel" class="form-control" require="必填项">
                    <option th:selected="${customer.custLevel==1}" value="1">新客</option>
                    <option th:selected="${customer.custLevel==2}" value="2">老客</option>
                    <option th:selected="${customer.custLevel==3}" value="3">熟客</option>
                    <option th:selected="${customer.custLevel==4}" value="4">会员</option>
                    <option th:selected="${customer.custLevel==5}" value="5">大会员</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-3 control-label">客户满意度 :</label>
            <div class="col-sm-8">
                <select name="custSatisfy" class="form-control" require="必填项">
                    <option th:selected="${customer.custSatisfy==1}" value="1">1</option>
                    <option th:selected="${customer.custSatisfy==2}" value="2">2</option>
                    <option th:selected="${customer.custSatisfy==3}" value="3">3</option>
                    <option th:selected="${customer.custSatisfy==4}" value="4">4</option>
                    <option th:selected="${customer.custSatisfy==5}" value="5">5</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-3 control-label">客户信用度 :</label>
            <div class="col-sm-8">
                <select name="custCredit" class="form-control" require="必填项">
                    <option th:selected="${customer.custCredit==1}" value="1">1</option>
                    <option th:selected="${customer.custCredit==2}" value="2">2</option>
                    <option th:selected="${customer.custCredit==3}" value="3">3</option>
                    <option th:selected="${customer.custCredit==4}" value="4">4</option>
                    <option th:selected="${customer.custCredit==5}" value="5">5</option>
                    <option th:selected="${customer.custCredit==6}" value="6">6</option>
                    <option th:selected="${customer.custCredit==7}" value="7">7</option>
                    <option th:selected="${customer.custCredit==8}" value="8">8</option>
                    <option th:selected="${customer.custCredit==9}" value="9">9</option>
                    <option th:selected="${customer.custCredit==10}" value="10">10</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-3 control-label">客户电话123123 :</label>

            <div class="col-sm-8">
                <input name="custTel" class="form-control" placeholder="" th:value="${customer.custTel}">
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-3 control-label">客户信用度 :</label>
            <div class="col-sm-8">
                <select name="custStatus" class="form-control" >
                    <option th:selected="${customer.custStatus==1}" value="1">恢复</option>
                    <option th:selected="${customer.custStatus==2}" value="2">删除</option>
                </select>
            </div>
        </div>
<!--        <div class="form-group">-->
<!--            <label  class="col-sm-3 control-label">状态 :</label>-->
<!--            <div class="col-sm-8">-->
<!--                <select name="custStatus" class="form-control" id="custStatus" th:value="${customer.custStatus}">-->
<!--                    <option value="1">恢复</option>-->
<!--                    <option value="2">删除</option>-->
<!--                </select>-->
<!--            </div>-->
<!--        </div>-->
    </div>
    <!-- /.box-body -->
    <div class="box-footer">
        <div class="pull-right">
            <button type="button" id="saveDetailCustomer" class="btn btn-info">确定</button>
            <button type="button" data-dismiss="modal" class="btn btn-default">取消</button>
        </div>
    </div>
    <!-- /.box-footer -->
</form>
<script>
    $(function () {
        $("#saveDetailCustomer").on('click', function () {
            if (doValidForm(CustomerDetailForm)) {
                Core.mask("#saveDetailCustomer");
                Core.postAjax("/customer2/edit",$("#CustomerDetailForm").serialize(),function (data) {
                    if (data.status == 200) {
                        Core.unmask("#saveDetailCustomer");
                        $("#userDetailModal").modal("hide");
                        $("#myModal").modal("hide");
                        Core.refreshTable("#table",true);
                    }
                    layer.msg(data.msg);
                })
            }
        });
    });
</script>